package com.guli.auth.feign;

import com.guli.common.utils.R;
import com.guli.common.vo.MemberTo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author WZH
 * @title: FeignMember
 * @projectName gulimall-java
 * @description:
 * @date 2022/1/14
 */
@FeignClient("gulimall-member")
public interface FeignMember {
    @GetMapping("member/member/getMemberByToken")
    MemberTo getMemberByToken(@RequestParam("token") String token);

    @PostMapping("member/member/save")
    Integer add(@RequestBody MemberTo member);

    @GetMapping("member/member/login")
    R login(@RequestParam String username,@RequestParam String password);
}
